<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_forum_topic_user_vote".
 *
 * @property string $id
 * @property string $topic_id 投票活动的id
 * @property string $vote_id 投票选项的id
 * @property string $hostname 投票时的ip地址
 * @property string $create_by 投票人
 * @property string $create_time 投票时间
 * @property int $del_flag
 */
class TForumTopicUserVote extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_forum_topic_user_vote';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'create_time'], 'required'],
            [['create_time'], 'safe'],
            [['del_flag'], 'integer'],
            [['id', 'topic_id', 'vote_id', 'create_by'], 'string', 'max' => 36],
            [['hostname'], 'string', 'max' => 128],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'topic_id' => 'Topic ID',
            'vote_id' => 'Vote ID',
            'hostname' => 'Hostname',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
